package javafx179labs.MIKHAILOV;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.*;
import javafx.scene.input.MouseEvent;
import javafx.scene.control.ListView;
import javafx.ext.swing.SwingButton;
import java.lang.System;
import javafx.scene.control.*;



var mafield = [];
var i : Integer[];
var text = "you";
var value :Integer=0 ;

Stage {
    title: "LAB2"
    width: 320
    height: 320
    scene: Scene
    {
        content:
        [

        TextBox
        {
            translateX:20
            translateY:20
            columns: 10
            text: bind text with inverse
         }

        Button
        {
            layoutX:70
            layoutY:10
            text: "ADD INFO"
            action: function() {insert text into mafield;}
        }

        ListView
        {
            items:bind mafield
            height:100
            width:50
            layoutX:20
            layoutY:70
        }

 for ( i in [0..5])
 {
         Button
         {
             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"0"
             action: function()
             {
             delete mafield[i]
             }
         }
  }

 for ( i in [0..10])
 {
         Button 
         {

             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"1"
             action: function()
             {
              delete mafield[i]
             }
          }
  }

  for ( i in [0..5])
 {
         Button
         {

             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"2"
             action: function()
             {
              delete mafield[i]
             }
          }
  }

  for ( i in [0..5])
 {
         Button
         {

             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"3"
             action: function()
             {
              delete mafield[i]
             }
          }
  }

  for ( i in [0..5])
 {
         Button
         {

             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"4"
             action: function()
             {
              delete mafield[i]
             }
          }
  }

for ( i in [0..5])
 {
         Button
         {

             height:10
             width:10
             layoutX:300
             layoutY:value=10+18*i
             text:"5"
             action: function()
             {
              delete mafield[i]
             }
          }
  }
        ]

 }
}